# ************************************
# Default template in module puppetlabs-apache
# Managed by Puppet
# ************************************

<VirtualHost <%= vhost_name %>:<%= port %>>
  ServerName <%= srvname %>
<% if serveradmin %>
  ServerAdmin <%= serveradmin %>
<% end %>
<% if serveraliases.is_a? Array -%>
<% serveraliases.each do |name| -%><%= "  ServerAlias #{name}\n" %><% end -%>
<% elsif serveraliases != '' -%>
<%= "  ServerAlias #{serveraliases}" %>
<% end -%>
  DocumentRoot <%= docroot %>
<% if directoryindex %>
  DirectoryIndex <%= directoryindex %>
<% end %>
  <Directory <%= docroot %>>
    Options <%= options %>
    AllowOverride <%= Array(override).join(' ') %>
    Order allow,deny
    allow from all
  </Directory>
  ErrorLog <%= logroot %>/<%= name %>_error.log
  LogLevel warn
  CustomLog <%= logroot %>/<%= name %>_access.log combined
  ServerSignature Off
</VirtualHost>

